
package es.udc.emarketapp.emarket.model.order.vo;

import es.udc.emarketapp.emarket.model.orderDetails.vo.OrderDetailsVO;
import es.udc.emarketapp.emarket.model.orderLine.vo.OrderLineVO;
import java.util.ArrayList;
import java.util.Collection;


public class OrderVO {

    private OrderDetailsVO orderDetails;
    private Collection<OrderLineVO> orderLines;

    public OrderVO(OrderDetailsVO orderDetails, Collection<OrderLineVO> orderLines) {
        this.orderDetails = orderDetails;
        this.orderLines = orderLines;
    }

    public OrderVO(OrderDetailsVO orderDetails) {
        this.orderDetails = orderDetails;
        this.orderLines = new ArrayList<OrderLineVO>();
    }


    public OrderDetailsVO getOrderDetails() {
        return orderDetails;
    }

    public void setOrderDetails(OrderDetailsVO orderDetails) {
        this.orderDetails = orderDetails;
    }

    /*
    void AddOrderLine(OrderLineVO orderLine){
    	this.orderLines.add(orderLine);
    	Double pesoActual = orderDetails.getPeso();
    	Double precioActual = orderLine.getValor();
    	
    	orderDetails.setPeso(pesoActual + orderLine.getPeso());
    	orderDetails.setPeso(precioActual + orderLine.getPeso());
    	
    }
    */
    
    public void addOrderLine(OrderLineVO orderLine){
    	this.orderLines.add(orderLine);
    }
    
    public Collection<OrderLineVO> getOrderLines() {
        return orderLines;
    }

    /*
    public double getGastosEnvio() {
        return gastosEnvio;
    }

    public void setGastosEnvio(double gastosEnvio) {
        this.gastosEnvio = gastosEnvio;
    }

    public String getIdVendedor() {
        return idVendedor;
    }

    public void setIdVendedor(String idVendedor) {
        this.idVendedor = idVendedor;
    }


    public double getPeso() {
        return peso;
    }

    public void setPeso(double peso) {
        this.peso = peso;
    }

    public double getValor() {
        return valor;
    }

    public void setValor(double valor) {
        this.valor = valor;
    }

    */
    
}

